<template>
    <div>
        <!-- 详情页面正确渲染 -->
        <div><img :src="item?.url" alt=""></div>
        <div>{{item?.title}}</div>
        <div>{{item?.pic}}</div>
    </div>
</template>
<script lang="ts" setup>
import axios from 'axios';
import {ref,onMounted} from 'vue'
import {useRoute} from 'vue-router'
import {listType} from '@/store'
const route=useRoute()
const {id}=route.params
let item=ref<listType>()
const getitemaxios=async()=>{
    const resp=await axios.get('/api/item',{params:{id}})
    const {list}=resp.data
    item.value=list
}
onMounted(()=>{
    getitemaxios()
})
</script>